Create allDevicesWithRoundedDisplayCorners and hasRoundedDisplayCorners variables. - #166
Create allDevicesWithRoundedDisplayCorners and hasRoundedDisplayCorners variables.#166Zandor300 wants to merge 5 commits into
Conversation
|
@dennisweissmann sorry for yet another mail notification 😜 |
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
|
@dennisweissmann Also, I suggest creating a 2.0 branch to start working on that to solve some of the issues that have breaking changes? If you're going to do that, I would suggest waiting on releasing my previous changes to save it for 2.0. |
|
Alright, I wanted to release an 2.0 with (at least) Swift 5.0, since that’s around the corner it makes sense to me. This repo uses master as the dev branch, so I would be fine with committing whatever you want to master. If there is something we should backport to an 1.X version we could cherrypick. WDYT? |
|
In that case, I'm fine with merging this pull request if you are. Do you want me to already make some changes for 2.0, like fixing issues like #149 and #130 if I have some spare time this week? |
* Add boolean and array functions to check if the device has a sensor housing. * Move variables together. * Rename allDevicesWithASensorHousing to allDevicesWithSensorHousing. * Create allDevicesWithRoundedDisplayCorners and hasRoundedDisplayCorners variables. * Create branch for 2.0 changes. * Rename iPhone Xs to XS and Xr to XR (fixes #149) * Fixed generation of allDevicesWithSensorHousing and hasSensorHousing through the gyb file. * Check if device is current. * Fixed formatting. * Check for current device in isZoomed. * Add documentation to the isCurrent variable. * Add static current variable and make the initialiser private. * Revert commit used to create the patch branch in my fork. * Fixed readme so that it also contains the rename of XS and XR. * Check for isCurrent on the isPhone and isPad variables when DeviceKit hasn't been updated for a new device yet. (Fixes #165) * Change device description to use small caps on iPhone XS (Max) and iPhone XR. * Changed all if !isCurrent statements to guards. * Remove .instance and the initialiser and completely move over to .current. * Fixed names of iPad 3, 4, 5 and 6. * Fix #166 not being added through the gyb file. * Fix documentation inside code to use Device.current instead of the constructor. * Fixed readme to use Device.current instead of the constructor. * Add new iPad Air (3th generation) and iPad Mini (5th generation). * Revert Zandor300@3eec7cd * Update to Swift 5. * Update tests for breaking changes. * Fix merge. * Fixed code alignment. * Fixed trailing whitespace violations. * Disable the function_body_length rule on mapToDevice(String). Since this function is generated with a switch for all devices, this needs to be this long. * Use Xcode 10.2 to build and test the project. This is required because Swift 5 isn't supported in Xcode 10.1. * Set .swift-version to 5.0 * Fixed description tests. * Add iPad (6th gen), iPad Air (3rd gen) and iPad Mini (5th gen) to the description test. * Fixed one test that still used Device(). * Created new test to prevent #165 from happening again. * Disable the function_body_length swiftlint rule on the testDescription(). * Added a bunch of tech specs and image links where missing. * Fixed spacing and another couple urls. * Add Swift 5 information to the readme. * Add a default case to the switch to cover future additions to WKInterfaceDeviceBatteryState. (Thanks robbiet480)
Create allDevicesWithRoundedDisplayCorners and hasRoundedDisplayCorners variables like suggested in #159. Doesn't however implement the breaking changes that were also suggested there so the issue shouldn't be closed.
Would like to also implement a variable for getting the actual corner radius of the display but according to this StackOverflow answer, it isn't as simple as just setting
layer.cornerRadius: https://apple.stackexchange.com/a/336499/277581(Additional commits are because I screwed up syncing my fork's master with upstream)